﻿using Hotel.DAL;
using Hotel.Model;

namespace Hotel.BLL
{
    public class DisCountBLL
    {

        public DisCountBLL(DisCountDAL disCountDAL) 
        {
            DisCountDAL = disCountDAL;
        }

        public DisCountDAL DisCountDAL { get; }




        /// <summary>
        /// 门店添加
        /// </summary>
        /// <param name="shopModel"></param>
        /// <returns></returns>
        public int ShopAdd(ShopModel shopModel)
        {

            try
            {
               
                return DisCountDAL.ShopAdd(shopModel);
            }
            catch (Exception)
            {

                throw;
            }



        }




        /// <summary>
        /// 门店显示
        /// </summary>
        /// <returns></returns>
        public List<ShopModel> ShopList()
        {

            try
            {
                return DisCountDAL.ShopList();  
            }
            catch (Exception)
            {

                throw;
            }
        }






        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="disCountModel"></param>
        /// <returns></returns>

        public int DisCountAdd(DisCountModel disCountModel)
        {
            try
            {
             
                return DisCountDAL.DisCountAdd(disCountModel);
            }
            catch (Exception)
            {

                throw;
            }


        }


        /// <summary>
        /// 显示
        /// </summary>
        /// <param name="count"></param>
        /// <param name="page"></param>
        /// <param name="Title">券标题模糊</param>
        /// <param name="ShopId">适用门店精确查询</param>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <returns></returns>
        public List<DisCountModel> DisCountList(out int count, out int page, string? Title = "", int ShopId = -1, int index = 1, int size = 2)
        {

            try
            {
               
                return DisCountDAL.DisCountList(out count, out page, Title, ShopId, index, size);
            }
            catch (Exception)
            {

                throw;
            }

        }




        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public int DisCountDel(int Id)
        {

            try
            {
             
                return DisCountDAL.DisCountDel(Id);

            }
            catch (Exception)
            {

                throw;
            }


        }





        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public DisCountModel DisCountAll(int Id)
        {
            try
            {

                return DisCountDAL.DisCountAll(Id);
            }
            catch (Exception)
            {

                throw;
            }

        }




        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="disCountModel"></param>
        /// <returns></returns>
        public int DisCountUpd(DisCountModel disCountModel)
        {
            try
            {
               
                return DisCountDAL.DisCountUpd(disCountModel);
            }
            catch (Exception)
            {

                throw;
            }


        }


















    }
}